/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2022. All rights reserved.
 * Author: z30016470
 * Create: 2022/07/05
 */

#ifndef FS_SCANNER_POSIX_PRODUCER_THREAD_H
#define FS_SCANNER_POSIX_PRODUCER_THREAD_H
#include "ProducerThread.h"

class PosixProducerThread : public ProducerThread {
public:
    explicit PosixProducerThread(std::shared_ptr<ScanQueue> scanQueue,
        std::shared_ptr<BufferQueue<DirectoryScan>> output,
        std::shared_ptr<StatisticsMgr> statsMgr,
        std::shared_ptr<ScanFilter> scanFilter,
        std::shared_ptr<FSScannerCheckPoint> chkPntMgr,
        ScanConfig config)
        : ProducerThread(scanQueue, output, statsMgr, scanFilter, chkPntMgr), m_config(config)
    {};
    PosixProducerThread() {};
    ~PosixProducerThread() override {};

    bool Start() override;
    void ProducerMain() override;
    void Exit() override;

private:
    ScanConfig m_config {};
};

#endif